<?php
	header("Content-Type:text/html;charset=utf-8");   
	//echo'<meta http-equiv="refresh" content="4">';  //定时刷新
	$link = @mysql_connect("localhost","root","root") or die("连接错误".mysql_error());
	mysql_select_db("test",$link);
	mysql_query("set names utf8");	

	//插入数据
	$sql = "INSERT INTO user (uName, uPwd, uSex, uTel, uEmail) VALUES ('胡友刚', '3735026', '1', '18626183405', 'hyghyg126@126.com')";
	@mysql_query($sql) or die("错误：".mysql_error());
	
	$sql = "INSERT INTO user (uName, uPwd, uSex, uTel, uEmail) VALUES ('刘钦莲', '8888888', '2', '18252997169', 'applehyg@126.com')";
	@mysql_query($sql) or die("错误：".mysql_error());
	
	//输出受影响的mysql行数
	echo mysql_affected_rows();
	
	mysql_close($link);
	//运行在sql语句后检查错误。
?>
